/**
 * @Project Name:blog-admin-api
 * @Package Name:cn.hoofungson.blog.admin.api.fallback.user
 * @Since JDK 1.8
 */

package cn.hoofungson.blog.authentication.server.fallback.user;

import cn.hoofungson.blog.authentication.server.client.user.UserFeignClient;
import cn.hoofungson.blog.business.service.interfaces.domain.dto.user.UserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

/**
 * @Description: UserFeignClientFallback
 * @Author 胡松 hoofungson@163.com
 * @Date 2020-03-24 23:14
 * @Version V1.0
 */
@Slf4j
@Component
public class UserFeignClientFallback implements UserFeignClient {

    @Override
    public ResponseEntity<UserDTO> get() {
        log.info("进入熔断器，服务降级！！");
        return new ResponseEntity<>(null);
    }

    @Override
    public ResponseEntity<UserDTO> getByUsername(String username) {
        log.info("进入熔断器，服务降级！！");
        return new ResponseEntity<>(null);
    }
}
